Intersoft ClientUI Documentation
Register<TType>(String,Func<IDependencyResolver,TType>) Method



The type to be registered.
The name of the registration for this type, which is used to distinguish between different registrations in the container.
The delegate which will be called to create an instance of the type TType.
Adds the function to resolve an named registration of the specified type to the container.
Syntax
Overloads Function Register(Of TType As Class)( _
   ByVal name As String, _
   ByVal func As Func(Of IDependencyResolver,TType) _
) As IRegistration
Dim instance As IDependencyRegistrar
Dim name As String
Dim func As Func(Of IDependencyResolver,TType)
Dim value As IRegistration
 
value = instance.Register(Of TType)(name, func)
IRegistration Register<TType>( 
   string name,
   Func<IDependencyResolver,TType> func
)
where TType: class
IRegistration^ Registergeneric<typename TType>
( 
   String^ name,
   Func<IDependencyResolver^,TType^>^ func
) 
where TType: ref class

Parameters

name
The name of the registration for this type, which is used to distinguish between different registrations in the container.
func
The delegate which will be called to create an instance of the type TType.

Type Parameters

TType
The type to be registered.

Return Value

An instance of IRegistration that can be used to configure how the get information about the registration, or change the lifetime manager.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

IDependencyRegistrar Interface
IDependencyRegistrar Members
Overload List

Send Feedback